package com.wgc.vip.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName points_history
 */
@TableName(value ="points_history")
@Data
public class PointsHistory implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 会员名称
     */
    private String vipName;

    /**
     * 操作内容
     */
    private String operationContent;

    /**
     * 之前积分
     */
    private Long previouslyAccumulatedPoints;

    /**
     * 变动积分
     */
    private Long variablePoints;

    /**
     * 当前积分
     */
    private Long currentPoints;

    /**
     * 操作时间
     */
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PointsHistory other = (PointsHistory) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getVipName() == null ? other.getVipName() == null : this.getVipName().equals(other.getVipName()))
            && (this.getOperationContent() == null ? other.getOperationContent() == null : this.getOperationContent().equals(other.getOperationContent()))
            && (this.getPreviouslyAccumulatedPoints() == null ? other.getPreviouslyAccumulatedPoints() == null : this.getPreviouslyAccumulatedPoints().equals(other.getPreviouslyAccumulatedPoints()))
            && (this.getVariablePoints() == null ? other.getVariablePoints() == null : this.getVariablePoints().equals(other.getVariablePoints()))
            && (this.getCurrentPoints() == null ? other.getCurrentPoints() == null : this.getCurrentPoints().equals(other.getCurrentPoints()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getVipName() == null) ? 0 : getVipName().hashCode());
        result = prime * result + ((getOperationContent() == null) ? 0 : getOperationContent().hashCode());
        result = prime * result + ((getPreviouslyAccumulatedPoints() == null) ? 0 : getPreviouslyAccumulatedPoints().hashCode());
        result = prime * result + ((getVariablePoints() == null) ? 0 : getVariablePoints().hashCode());
        result = prime * result + ((getCurrentPoints() == null) ? 0 : getCurrentPoints().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", vipName=").append(vipName);
        sb.append(", operationContent=").append(operationContent);
        sb.append(", previouslyAccumulatedPoints=").append(previouslyAccumulatedPoints);
        sb.append(", variablePoints=").append(variablePoints);
        sb.append(", currentPoints=").append(currentPoints);
        sb.append(", createTime=").append(createTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}